#!/bin/bash

cd "`dirname $0`"

cp ./src/Libs/PostgresLib/class_pgsql.h ./bin/include
cp ./src/Libs/PostgresLib/get_param_pgsql.h ./bin/include
cp ./src/Libs/PostgresLib/reg_pgsql.h ./bin/include
cp ./src/Libs/Receipt/receipt.h ./bin/include
cp ./src/Libs/Setup_param/setup_param.h ./bin/include

cd src/Libs/

cd AddonFunc
make clean
./makelib
cd ../

cd DebugLevelLog
make clean
./makelib
cd ../

cd Encoding
make clean
./makelib
cd ../

cd Reader_Config
make clean
./makelib
cd ../

cd Setup_param
make clean
./makelib
cd ../

cd Receipt
make clean
./makelib
cd ../

cd PostgresLib
make clean
./makelib
cd ../

cd StateStore
make clean
./makelib
cd ../

cd Cyberpay
rm .obj/cyberpay.o libcyberpay.so
./makelib
cd ../

#------------------------
cd ../QTLibs

cd BlockTimer
make clean
./makelib
cd ../

cd CdspView
make clean
./makelib
cd ../

cd CreateNewScheme
make clean
./makelib
cd ../

cd CreateNewSchemePerec
make clean
./makelib
cd ../

cd DedicateComboBox
make clean
./makelib
cd ../

cd KeyboardDevices
make clean
./makelib
cd ../

cd Messages
make clean
./makelib
cd ../

cd HwSignalController
make clean
./makelib
cd ../

cd AuthorizationForm
make clean
./makelib
cd ../

cd AuthorizationObject
make clean
./makelib
cd ../

cd AddWareController
make clean
./makelib
cd ../

cd StrickOutTabItm
make clean
./makelib
cd ../

cd TimeDate
make clean
./makelib
cd ../

cd KkmRegistration
make clean
./makelib
cd ../

cd InsertTransaction
make clean
./makelib
cd ../


cd PrintFormLib
make clean
./makelib
cd ../

cd InpasLib
make clean
./makelib
cd ../

#------------------------
cd ../Interfaces

cd AccessRights
make clean
./makeprog
cd ../

cd DevicesConf
make clean
./makeprog
cd ../

cd ServiceLib
make clean
./makelib
cd ../

cd SetupLib
make clean
./makelib
cd ../

cd RMK
make clean
./makeprog
cd ../

cd Reshka
make clean
./makeprog
cd ../

cd SetupLoadUnload
make clean
./makeprog
cd ../

cd WareProject
make clean
./makeprog
cd ../

#------------------------
cd ../daemons

cd DisplayDaemon
make clean
./makeprog
cd ../

cd Upload
make clean
./makeprog
cd ../

cd daemon_unload
make clean
./makeprog
cd ../
